
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>给静静的爱</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: linear-gradient(to bottom right, #ff9a9e, #fad0c4);
            margin: 0;
            overflow: hidden;
            font-family: 'Arial', sans-serif;
        }

        .container {
            text-align: center;
            position: relative;
        }

        .heart {
            position: relative;
            width: 200px;
            height: 180px;
            margin: 0 auto;
            animation: heartbeat 1.2s infinite;
        }

        .heart:before,
        .heart:after {
            position: absolute;
            content: "";
            left: 100px;
            top: 0;
            width: 100px;
            height: 160px;
            background: #ff3b3f;
            border-radius: 100px 100px 0 0;
            transform: rotate(-45deg);
            transform-origin: 0 100%;
        }

        .heart:after {
            left: 0;
            transform: rotate(45deg);
            transform-origin: 100% 100%;
        }

        @keyframes heartbeat {
            0% { transform: scale(1); }
            25% { transform: scale(1.1); }
            50% { transform: scale(1); }
            75% { transform: scale(1.1); }
            100% { transform: scale(1); }
        }

        .message {
            margin-top: 40px;
            color: #fff;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
            font-size: 32px;
            font-weight: bold;
            animation: colorChange 5s infinite;
        }

        @keyframes colorChange {
            0% { color: #ff3b3f; }
            25% { color: #ff7b25; }
            50% { color: #ffe221; }
            75% { color: #56e39f; }
            100% { color: #56c5e3; }
        }

        .sparkle {
            position: absolute;
            background: #fff;
            border-radius: 50%;
            pointer-events: none;
            animation: sparkle 1.5s linear infinite;
        }

        @keyframes sparkle {
            0% {
                transform: translate(0, 0) scale(0);
                opacity: 0;
            }
            50% {
                opacity: 1;
            }
            100% {
                transform: translate(var(--tx), var(--ty)) scale(1);
                opacity: 0;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="heart"></div>
        <div class="message">静静我爱你</div>
    </div>

    <script>
        // 创建闪烁效果
        function createSparkles() {
            const body = document.querySelector('body');
            const colors = ['#ff3b3f', '#ff7b25', '#ffe221', '#56e39f', '#56c5e3', '#ffffff'];

            setInterval(() => {
                const sparkle = document.createElement('div');
                sparkle.classList.add('sparkle');

                const size = Math.random() * 10 + 5;
                const color = colors[Math.floor(Math.random() * colors.length)];

                sparkle.style.width = `${size}px`;
                sparkle.style.height = `${size}px`;
                sparkle.style.background = color;
                sparkle.style.left = `${Math.random() * 100}vw`;
                sparkle.style.top = `${Math.random() * 100}vh`;

                // 随机移动方向
                const tx = (Math.random() - 0.5) * 200;
                const ty = (Math.random() - 0.5) * 200;
                sparkle.style.setProperty('--tx', `${tx}px`);
                sparkle.style.setProperty('--ty', `${ty}px`);

                body.appendChild(sparkle);

                // 移除元素
                setTimeout(() => {
                    sparkle.remove();
                }, 1500);
            }, 100);
        }

        // 页面加载后开始创建闪烁效果
        window.addEventListener('load', createSparkles);
    </script>
</body>
</html>
